package com.tiankun.eurekausermsg.mapper;

import com.tiankun.eurekausermsg.pojo.User;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.Map;

/**
 * @Author 杨天可
 * @Date 2020/11/10 10:29
 * @Version 1.0
 */
@Repository
public interface UserMapper extends Mapper<User> {
    //用户测试
    Map find();

    //用户注册
    int insertInfo(String phone, String password, Date created, String salt);

    //根据电话查找是否存在该用户
    int selectByPhone(String phone);

    //用户登录返回信息
    Map findByPhone(String phone);
    //获取盐
    String getsalt(String phone);
    //用户登录时查找密码
    String findpwd(String phone);

    //用户忘记密码
    int changepwd(String password,String salt,String phone);
}
